<style scoped>
.el-tabs--card {
  height: calc(100vh - 140px);
}

.el-tab-pane {
  height: calc(100vh - 140px);
  overflow-y: auto;
}
</style>
<template>
  <div>
    <el-tabs v-model="activeName">
      <el-tab-pane label="相册列表" name="albumList">
        <album-list ref="albumList"/>
      </el-tab-pane>
      <el-tab-pane label="新增相册" name="albumAddNew">
        <album-add-new ref="albumAddNew" @changeTab="changeTab"/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import albumList from "@/views/backState/site/album/albumList.vue";
import albumAddNew from "@/views/backState/site/album/albumAddNew.vue";

export default {
  name: "siteMain",
  components: {
    albumList,
    albumAddNew
  },
  data() {
    return {
      activeName: "albumList"
    }
  },
  methods: {
    changeTab(name) {
      this.activeName = name;
      this.$refs.albumList.loadAlbumTable();
      this.$refs.albumAddNew.resetForm();
    }
  }
}
</script>

